#ifndef MODBUSCONTROLSTRUCT_H
#define MODBUSCONTROLSTRUCT_H

#include <QObject>

class ModbusControlStruct
{
public:
    ModbusControlStruct();

    quint8 deviceAddress() const;
    void setDeviceAddress(const quint8 &deviceAddress);

    quint8 functionCode() const;
    void setFunctionCode(const quint8 &functionCode);

    quint16 registerStartAddress() const;
    void setRegisterStartAddress(const quint16 &registerStartAddress);

    quint16 registerNumber() const;
    void setRegisterNumber(const quint16 &registerNumber);

    quint16 pointAddress() const;
    void setPointAddress(const quint16 &pointAddress);

    quint16 calculationMode()const;
    void setCalculationMode(quint16 modeData);

    QList<quint16> registrValueList() const;
    void setRegistrValueList(const QList<quint16> &registrValueList);

    quint16 queryTime()const;
    void setqueryTime(quint16 time);

    bool operator ==(const ModbusControlStruct& rhs);  //重载相等
    bool operator <(const ModbusControlStruct& rhs) const;
private:
    quint8  m_deviceAddress;
    quint8  m_functionCode;
    quint16 m_registerStartAddress;
    quint16 m_registerNumber;
    quint16 m_pointAddress;
    quint16 m_calculationMode;
    QList<quint16> m_registrValueList;
    quint16 m_queryTime;
};

#endif // MODBUSCONTROLSTRUCT_H
